package com.hxht.storage.server.pojo;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
//@Table(schema="storage")
public class NvrDeviceInfo extends BaseEntity{

	
	/** DVR设备SN号 */
	private String deviceId;
	
	/** deviceType: DVR设备类型，<br/>
	 * 	1 - 海康;<br/>
	 *  其他类型预留  */
	private Integer deviceType;
	
	/** subDeviceType: DVR设备子类型，预留 */
	private Integer subDeviceType;
	
	/** DVR设备IP地址 */
	private String ip;
	
	/** DVR设备端口 */
	private Integer port;
	
	/** DVR设备登陆用户名 */
	private String username;
	
	/** DVR设备登陆密码 */
	private String passwd;
	
	@OneToMany(mappedBy = "nvr", fetch = FetchType.EAGER
			, cascade = CascadeType.ALL)
	private Set<NvrDiskInfo> diskList;
	
	/** dvr在线标识  */
	private Boolean isOnline;
	
	/** nvr支持的最大通道数 */
	private Integer maxIpchannels;
	
	@OneToMany(mappedBy = "nvrDevice", fetch = FetchType.EAGER
			, cascade = CascadeType.ALL)
	private Set<NvrIpchannelInfo> ipchannelList;
	
	
	public NvrDeviceInfo(){}
	
	public Integer getMaxIpchannels() {
		return maxIpchannels;
	}

	public void setMaxIpchannels(Integer maxIpchannels) {
		this.maxIpchannels = maxIpchannels;
	}

	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}

	public Set<NvrIpchannelInfo> getIpchannelList() {
		return ipchannelList;
	}

	public void setIpchannelList(Set<NvrIpchannelInfo> ipchannelList) {
		this.ipchannelList = ipchannelList;
	}

	public Integer getDeviceType() {
		return deviceType;
	}

	public void setDeviceType(Integer deviceType) {
		this.deviceType = deviceType;
	}

	public Integer getSubDeviceType() {
		return subDeviceType;
	}

	public void setSubDeviceType(Integer subDeviceType) {
		this.subDeviceType = subDeviceType;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		this.port = port;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPasswd() {
		return passwd;
	}

	public void setPasswd(String password) {
		this.passwd = password;
	}

	public Boolean isOnline() {
		return isOnline;
	}

	public void setIsOnline(Boolean isOnline) {
		this.isOnline = isOnline;
	}

	public Set<NvrDiskInfo> getDiskList() {
		return diskList;
	}

	public void setDiskList(Set<NvrDiskInfo> diskList) {
		this.diskList = diskList;
	}

}
